package com.liuxm.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liuxm.user.mapper.UserMapper;
import com.liuxm.user.pojo.User;
import com.liuxm.user.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @author liuxm
 * @version 1.0
 * @date 2021/3/21 21:41
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User queryByUsername(String username) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        return this.getOne(queryWrapper);
    }
}
